package com.serkol.ams.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.serkol.ams.entity.VideoCategory;
import com.serkol.ams.mapper.VideoCategoryMapper;
import com.serkol.ams.service.VideoCategoryService;
import com.serkol.handler.MyLambdaQueryWrapper;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
* @author pingan
* @description 针对表【video_category】的数据库操作Service实现
* @createDate 2023-10-31 19:38:54
*/
@Service
public class VideoCategoryServiceImpl extends ServiceImpl<VideoCategoryMapper, VideoCategory>
    implements VideoCategoryService{

    @Override
    public List<Map<String, Object>> findByList() {
        MyLambdaQueryWrapper<VideoCategory> queryWrapper=new MyLambdaQueryWrapper<>();
        queryWrapper.select(VideoCategory::getId).as("value").select(VideoCategory::getName).as("label");
        return this.listMaps(queryWrapper);
    }
}




